package com.ceilcell.wx.model;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.Objects;

/**
 * Created by Administrator on 2017/4/6.
 */

public class TextMessageXML implements Serializable {

    private String FromUserName;

    private String ToUserName;

    private String MsgType;

    private long   CreateTime;

    private String Content;


    public String getFromUserName() {
        return FromUserName;
    }

    public void setFromUserName(String FromUserName) {
        this.FromUserName = FromUserName;
    }

    public String getToUserName() {
        return ToUserName;
    }

    public void setToUserName(String ToUserName) {
        this.ToUserName = ToUserName;
    }

    public String getMsgType() {
        return MsgType;
    }

    public void setMsgType(String MsgType) {
        this.MsgType = MsgType;
    }

    public long getCreateTime() {
        return CreateTime;
    }

    public void setCreateTime(long CreateTime) {
        this.CreateTime = CreateTime;
    }

    public String getContent() {
        return Content;
    }

    public void setContent(String Content) {
        this.Content = Content;
    }

    public TextMessageXML(String FromUserName, String ToUserName, String MsgType, long CreateTime, String Content) {
        this.FromUserName = FromUserName;
        this.ToUserName = ToUserName;
        this.MsgType = MsgType;
        this.CreateTime = CreateTime;
        this.Content = Content;
    }

    public TextMessageXML() {
    }

    @Override
    public String toString() {
        return "TextMessage{" +
                "FromUserName='" + FromUserName + '\'' +
                ", ToUserName='" + ToUserName + '\'' +
                ", MsgType='" + MsgType + '\'' +
                ", CreateTime=" + CreateTime +
                ", Content='" + Content + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TextMessageXML that = (TextMessageXML) o;
        return Objects.equals(FromUserName, that.FromUserName) &&
                Objects.equals(ToUserName, that.ToUserName) &&
                Objects.equals(MsgType, that.MsgType) &&
                Objects.equals(CreateTime, that.CreateTime) &&
                Objects.equals(Content, that.Content);
    }

    @Override
    public int hashCode() {
        return Objects.hash(FromUserName, ToUserName, MsgType, CreateTime, Content);
    }
}
